/*
 * @Author: zhanglianchang
 * @Date: 2020-08-01 14:39:32
 * @Last Modified by: taoshiwei
 * @Last Modified time: 2019-04-29 14:53:23
 *
 * 学科有关的接口：自己写吧~~  已经被张老师删了 ^_^
 */
import { createAPI } from '@/utils/request'
// 获取学科列表
export const getSubjectList = params => createAPI(
  '/subjects',
  'get',
  params
)

// 删除学科
export const removeSubject = id => createAPI(
    `/subjects/${id}`,
    'delete'
)

// 新增学科
export const addSubjects = data => createAPI(
  '/subjects',
  'post',
  data
)

// 修改学科
export const updateSubject = data => createAPI(
    `/subjects/${data.id}`,
    'put',
    data
)

// 学科详情
export const detail = id => createAPI(
    `/subjects/${id}`,
    'get'
)

// 学科简单列表
export const simple = data => createAPI(
  '/subjects/simple',
  'get',
  data
)

// 学科简单列表
export const getSubjectList2 = data => createAPI('/subjects/simple', 'get', data)

// 二级目录
export const getCourseDetails = data => createAPI('/directorys/simple', 'get', data)

// 标签
export const getTags = data => createAPI('/tags/simple', 'get', data)

// 录入人
export const getUser = data => createAPI('/users/simple', 'get', data)
